/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package se.sll.service.catalogue.common;

import com.cedarsoftware.util.SafeSimpleDateFormat;
import java.util.Date;
import java.text.ParseException;

/**
 *
 * @author khaleddaham
 */
public class ISO8601 {
    public static Date formatTime(String date) throws ParseException {
        return new SafeSimpleDateFormat("yyyyMMddHHmmss").parse(date);
    }    
    
    public static String formatTime(Date date)  {
        return new SafeSimpleDateFormat("yyyyMMddHHmmss").format(date);
    }    
}
